<?php
// +----------------------------------------------------------------------
// | PHP [ JUST YOU ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2017 http://www.jyphp.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: FlyingPig <flyingpigfp@163.com>
// +----------------------------------------------------------------------

namespace App\Model\QuicklyGrab;


use App\Model\Base;
use Illuminate\Support\Facades\DB;

class PrizeList extends Base
{

    protected $table = 't_discount_info';

    protected $appends = ['nickname','match_name'];

    public function getNicknameAttribute()
    {
        return DB::table('t_player_info')->where('id',$this->uid)->value('nick_name');
    }

    public function getMatchNameAttribute()
    {
        return DB::table('t_quickly_grab_info')->where('id',$this->match_id)->value('name');
    }

}